<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
	<link rel="stylesheet" th:href="@{/webjars/layui/css/layui.css}">
</head>
<body>
	<form class="layui-form"  id="addForm" th:action="@{/account/add}"
		method="post">
		<div class="layui-form-item">
			<label class="layui-form-label">用户名</label>
			<div class="layui-input-block">
				<input type="text" name="username" placeholder="请输入用户名"
					   autocomplete="off" class="layui-input" lay-verify="required|checkUsername" maxlength="20">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">密码</label>
			<div class="layui-input-block">
				<input type="password" name="password" placeholder="请输入密码"
					   autocomplete="off" class="layui-input" lay-verify="required" maxlength="20">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">真实姓名</label>
			<div class="layui-input-block">
				<input type="text" name="realName" placeholder="请输入姓名"
					autocomplete="off" class="layui-input" lay-verify="required" maxlength="50">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">角色</label>
			<div class="layui-input-block">
				<select name="roleId" lay-verify="required">
					<option value="">--请选择--</option>
					<option value="" th:each="role:${roles}" th:value="${role.roleId}" th:text="${role.roleName}">
					</option>
				</select>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">性别</label>
			<div class="layui-input-block">
				<input type="radio" name="sex" value="男" title="男" checked> <input
					type="radio" name="sex" value="女" title="女">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">邮箱</label>
			<div class="layui-input-block">
				<input type="text" name="email" placeholder="请输入邮箱"
					autocomplete="off" class="layui-input" lay-verify="email" maxlength="100">
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit lay-filter="addSubmit">立即提交</button>
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>
	</form>
</body>
</html>
